<%@ page contentType="text/html; charset=utf-8"%>

<!--初始化css-->
<link rel="stylesheet" href="${ctx}/common/css/style.css" type="text/css" />

<!--初始化js-->
<script src="${ctx}/common/js/main.js" type="text/javascript"></script>
<script src="${ctx}/common/js/common.js" type="text/javascript"></script>

<!-- jQuery formValidator表单验证插件 -->
<link type="text/css" rel="stylesheet" href="${ctx}/common/formValidator/style/validator.css"></link>

<script src="${ctx}/common/formValidator/jquery_last1.js" type="text/javascript"></script>
<script src="${ctx}/common/formValidator/formValidator.js" type="text/javascript" charset="UTF-8"></script>
<script src="${ctx}/common/formValidator/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
<script src="${ctx}/common/formValidator/DateTimeMask.js" type="text/javascript"></script>


<!-- Tab选项卡 -->
<link rel="stylesheet" href="${ctx}/common/css/tabs-no-images.css" type="text/css" />
<script type="text/javascript" src="${ctx}/common/js/jquery.tools.min.js"></script>

<script language="javascript">   
	function validateChars(){    
		 //记录不含引号的文本框数量    
		 var resultTag = 0;    
		 //记录所有text文本框数量    
		 var flag = 0;    
		 for(var i = 0; i < document.forms[0].elements.length; i ++)    
		 {    
			  if(document.forms[0].elements[i].type=="text")    
			  {    
			            flag = flag + 1;    
			
				   if(/^[^\|"'%<>]*$/.test(document.forms[0].elements[i].value))   
				     resultTag = resultTag+1;   
				   else   
				    document.forms[0].elements[i].select();   
				}   
		 }   
	    
		 if(resultTag == flag){
			return true;
		  } else{   
		  	alert("文本框中不能含有\n\n 1 单引号: ' \n 2 双引号: \" \n 3 竖  杠: | \n 4 尖角号: < > \n 5 百分号: % \n\n请检查输入！");    
		  	return false;    
		 }  
		 

	} 
	
	function validateDate(startDate,endDate){
		
		if(!Common.isdate(startDate)){
			alert("起始时间格式不正确!");
			return false;
		}
		if(!Common.isdate(endDate)){
			alert("截至时间格式不正确!");
			return false;
		}
		try{
	           if(startDate > endDate){
	             alert("开始日期不能大于结束日期");
	             return false;
	           }                                                  
	       }catch(e){
	           return false;
	       }
	   return true;
	}
</script> 
